<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
  <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
  <link rel="stylesheet" href="docgen-resources/docgen.css" type="text/css">
  <meta name="generator" content="FreeMarker Docgen (DocBook 5)">
  <title>
    FreeMarker Manual - List of deprecated built-ins
  </title>
    <script type="text/javascript" src="docgen-resources/jquery.js"></script>
    <script type="text/javascript" src="docgen-resources/linktargetmarker.js"></script>
</head>
<body>

    <div class="navigation">
    <div class="breadcrumb">
<span class="breadcrumb">        You are here:
          <a href="index.html">Book</a>
            <b>></b>
          <a href="ref.html">Reference</a>
            <b>></b>
          <a href="ref_deprecated.html">Deprecated FTL constructs</a>
            <b>></b>
          List of deprecated built-ins
</span>    </div>
    <div class="bookmarks">
<span class="bookmarks">Bookmarks:
<a href="alphaidx.html">Alphabetical Index</a>, <a href="gloss.html">Glossary</a>, <a href="ref.html">Reference</a>, <a href="app_faq.html">FAQ</a>, <a href="api/index.html">Java API</a>, <a href="../index.html">FreeMarker Home</a></span>    </div>
    <div class="pagers">
      <div class="pagersVerticalSpacer"><img src="docgen-resources/img/none.gif" width="1" height="1" alt="" hspace="0" vspace="0" border="0"/></div>
<div class="pagerButton"><a href="ref_depr_oldmacro.html"><span class="hideA">Next page: </span>Old-style macro and call directives</a></div><div class="pagerButton"><a href="ref_depr_directive.html">Previous page</a></div><div class="pagerButton"><a href="ref_deprecated.html">Parent page</a></div><div class="pagerButton"><a href="index.html">Contents</a></div>      <div class="pagersVerticalSpacer"><img src="docgen-resources/img/none.gif" width="1" height="1" alt="" hspace="0" vspace="0" border="0"/></div>
    </div>
    </div>

<div id="mainContent">

  
  
  
  
  <h1 class="rank_section1"
        id="pageTopTitle">
<a name="ref_depr_builtin"></a>List of deprecated built-ins  </h1>
    
    
<p>The following built-ins are deprecated, but still
        working:</p>    <div class="itemizedlist">
<ul>
          <li>
            <p> <tt style="color: #A03D10">default</tt>: This was deprecated
            with the introduction of the <a href="dgui_template_exp.html#dgui_template_exp_missing_default">default value
            operator</a>.
            <tt style="color: #A03D10"><i style="color: #DD4400">exp1</i>?default(<i style="color: #DD4400">exp2</i>)</tt>
            is near equivalent with
            <tt style="color: #A03D10"><i style="color: #DD4400">exp1</i>!<i style="color: #DD4400">exp2</i></tt>,
            and
            <tt style="color: #A03D10">(<i style="color: #DD4400">exp1</i>)?default(<i style="color: #DD4400">exp2</i>)</tt>
            is near equivalent with with
            <tt style="color: #A03D10">(<i style="color: #DD4400">exp1</i>)!<i style="color: #DD4400">exp2</i></tt>.
            The only difference is that prior to FreeMarker 2.4, the
            <tt style="color: #A03D10">default</tt> built-in has always evaluated
            <tt style="color: #A03D10"><i style="color: #DD4400">exp2</i></tt>, while the
            default value operator only evaluates it when the default value is
            really needed. Starting from FreeMarker 2.4, however, the
            <tt style="color: #A03D10">default</tt> built-in was improved, and behaves
            exactly like the default value operator.</p>
          </li>

          <li>
            <p><tt style="color: #A03D10">exists</tt>: This was deprecated with
            the introduction of the <a href="dgui_template_exp.html#dgui_template_exp_missing_test">missing value test
            operator</a>.
            <tt style="color: #A03D10"><i style="color: #DD4400">exp1</i>?exists</tt> is
            equivalent with
            <tt style="color: #A03D10"><i style="color: #DD4400">exp1</i>??</tt>, also
            <tt style="color: #A03D10">(<i style="color: #DD4400">exp1</i>)?exists</tt> is
            equivalent with with
            <tt style="color: #A03D10">(<i style="color: #DD4400">exp1</i>)??</tt>.</p>
          </li>

          <li>
            <p><tt style="color: #A03D10">if_exists</tt>: This was deprecated
            with the introduction of the <a href="dgui_template_exp.html#dgui_template_exp_missing_default">default value
            operator</a>.
            <tt style="color: #A03D10"><i style="color: #DD4400">exp1</i>?if_exists</tt> is
            similar to <tt style="color: #A03D10"><i style="color: #DD4400">exp1</i>!</tt>,
            and <tt style="color: #A03D10">(<i style="color: #DD4400">exp1</i>)?if_exists</tt>
            is similar to
            <tt style="color: #A03D10">(<i style="color: #DD4400">exp1</i>)!</tt>. The
            difference is that the default value with
            <tt style="color: #A03D10">if_exists</tt> is not only empty string, empty
            sequence and empty hashs at the same time, but also boolean
            <tt style="color: #A03D10">false</tt> and a transform that does nothing and
            ignores all parameters.</p>
          </li>

          <li>
            <p><tt style="color: #A03D10">web_safe</tt>: the same as <a href="ref_builtins_string.html#ref_builtin_html"><tt>html</tt></a></p>
          </li>
        </ul>    </div>
  
</div>

    <div class="navigation">
    <div class="pagers">
      <div class="pagersVerticalSpacer"><img src="docgen-resources/img/none.gif" width="1" height="1" alt="" hspace="0" vspace="0" border="0"/></div>
<div class="pagerButton"><a href="ref_depr_oldmacro.html"><span class="hideA">Next page: </span>Old-style macro and call directives</a></div><div class="pagerButton"><a href="ref_depr_directive.html">Previous page</a></div><div class="pagerButton"><a href="ref_deprecated.html">Parent page</a></div><div class="pagerButton"><a href="index.html">Contents</a></div>      <div class="pagersVerticalSpacer"><img src="docgen-resources/img/none.gif" width="1" height="1" alt="" hspace="0" vspace="0" border="0"/></div>
    </div>
    <div class="breadcrumb">
<span class="breadcrumb">        You are here:
          <a href="index.html">Book</a>
            <b>></b>
          <a href="ref.html">Reference</a>
            <b>></b>
          <a href="ref_deprecated.html">Deprecated FTL constructs</a>
            <b>></b>
          List of deprecated built-ins
</span>    </div>
    </div>

<table border=0 cellspacing=0 cellpadding=0 width="100%">
    <tr>
      <td colspan=2><img src="docgen-resources/img/none.gif" width=1 height=8 alt=""></td>
    <tr>
      <td align="left" valign="top"><span class="smallFooter">
            FreeMarker Manual -- For FreeMarker 2.3.16
            <br>
          HTML generated: 2009-12-08 08:38:54 GMT
      </span></td>
      <td align="right" valign="top"><span class="smallFooter">
          <a href="http://www.xmlmind.com/xmleditor/">
            <img src="docgen-resources/img/xxe.gif" alt="Edited with XMLMind XML Editor">
          </a>
      </span></td>
    </tr>
</table>
  <!-- Put pre-loaded images here: -->
  <div style="display: none">
    <img src="docgen-resources/img/linktargetmarker.gif" alt="Here!" />
  </div>
</body>
</html>

